import java.util.Scanner;
import java.util.Arrays;
import book.*;
import user.*;
import operation.*;

public class Main {
    public static void main(String[] args) {
        BookList bookList = new BookList("测试");
        Scanner scanner = new Scanner(System.in);
        int choice = 1;
        User user = null;
        while(choice != 0) {
            User.land();
            choice = scanner.nextInt();
            switch(choice) {
                case(0):
                    System.out.println("退出系统");
                    return;
                case(1):
                    user = new Reader("xtc", "12345", "12345");
                    choice = 0;
                    break;
                case(2):
                    user = new Leader("xtc", "12345", "12345");
                    choice = 0;
                    break;
                default:
                    System.out.println("输入错误，请重新输入");
            }
        }
        choice = 1;
        while(choice != 0) {
            user.menu();
            choice = scanner.nextInt();
            user.doOperation(choice, bookList);
        }
    }
}